package com.yan.test1;

import java.util.ArrayList;

/**
 * @author taoge
 * @Date 2024/8/4 15:58
 * @Description
 */
public class Test1 {
    public static void main(String[] args) {
        ArrayList<Dog> list = new ArrayList();
        list.add(new Dog("大黄" , "阿拉斯加"  , 100));
        list.add(new Dog("小黑" , "阿拉斯加"  , 59));
        list.add(new Dog("小白" , "阿拉斯加"  , 58));

        list.forEach(item-> System.out.println(item.getHealth()<60 ? item : ""));
    }
}
